﻿@using 软件系统浏览器模版.Models
@using  CommonLibrary
 

@{
    if (Session[SessionItemsDescription.UserAccount] == null)
    {
        <ul class="nav navbar-nav navbar-right">
            <li>@Html.ActionLink("登录", "AccountLogin", "Home")</li>
        </ul>
    }
    else
    {
        UserAccount user = Session[软件系统浏览器模版.Models.SessionItemsDescription.UserAccount] as UserAccount;

        using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
        {
            @Html.AntiForgeryToken()

            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                        您好， @user.UserName !
                    </a>
                    <ul class="dropdown-menu">
                        <li>@Html.ActionLink("账户详细信息", "AccountDetail", "Account")</li>
                        <li>@Html.ActionLink("修改密码", "ChangePassword", "Account")</li>
                    </ul>
                </li>
                <li><a href="javascript:document.getElementById('logoutForm').submit()">注销</a></li>
            </ul>
        }
    }
}
